package com.jservice.api.service.smk;

import com.jservice.api.dto.Request;
import com.jservice.api.dto.Response;
import com.jservice.api.dto.ResponseHeader;
import com.jservice.api.service.BaseService;
import com.jservice.api.service.IService;
import com.jservice.api.smkAppUser.AppUserKit;
import com.jservice.model.SmkAppUser;
import org.springframework.stereotype.Service;

/**
 * Smk0001 - 根据token 判断token有效性
 *
 * @Author cwledit
 * @DATE 2017/6/16.
 */
@Service("smk0001")
public class Smk0001 extends BaseService implements IService{

    @Override
    public Response excute(Request request, Response response, ResponseHeader header, String method) throws Exception {
        SmkAppUser smkAppUser = AppUserKit.getCurrent(request);
        if (smkAppUser == null){
            return renderSUC(false,response,header);
        }else {
            return renderSUC(true,response,header);
        }
    }
}
